package com.kaikeba.util;

import com.kaikeba.bean.Courier;
import com.kaikeba.bean.User;

import javax.servlet.http.HttpSession;

public class UserSessionUtil {

    public static void setUser(HttpSession session, User user){
        session.setAttribute("user",user);
    }

    public static User getUser(HttpSession session){
        User user = (User) session.getAttribute("user");
        return user;
    }

    public static void setCourier(HttpSession session, Courier courier){
        session.setAttribute("courier",courier);
    }

    public static Courier getCourier(HttpSession session){
        Courier courier = (Courier) session.getAttribute("courier");
        return courier;
    }
}
